-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[uss_qualifier/scenarios/netrid/nominal_behavior] Add checks for UA classification in SP (NET0260) #870
base: main
Are you sure you want to change the base?
Conversation
…lassification in SP (NET0260)
f82aa54
to
a8af531
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks good overall, but one of the check sub-functions does not seem to be invoked.
@@ -651,3 +673,209 @@ def _evaluate_operational_status( | |||
key="skip_reason", | |||
message=f"Unsupported version {self._rid_version}: skipping Operational Status evaluation", | |||
) | |||
|
|||
def _evaluate_ua_type( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call to this function is missing (presumably in evaluate_sp_details
)
query_timestamps=[query_timestamp], | ||
) | ||
|
||
equivalent = {injection.UAType.HybridLift, injection.UAType.VTOL} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little comment explaining this might help us in the future
try: | ||
injection.UAType(observed_val) | ||
except ValueError: | ||
check.record_failed( | ||
"UA type is invalid", | ||
details=f"USS returned an invalid UA type: {observed_val}.", | ||
query_timestamps=[query_timestamp], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we actually reach this code if observed_val
is invalid? I would assume that if it is invalid, it was different than injected_val
?
Or do we expect injected_val
to take invalid values?
injected_eu_category = injected_eu_classification.get("category") | ||
injected_eu_class = injected_eu_classification.get("class") | ||
observed_eu_category = ( | ||
observed_eu_classification.get("category") | ||
if observed_eu_classification | ||
else None | ||
) | ||
observed_eu_class = ( | ||
observed_eu_classification.get("class") | ||
if observed_eu_classification | ||
else None | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we compare the classification dicts earlier (with injected_classification_fields != observed_classification_fields:
), would we not fail at an earlier stage? (Although, I see that the severity level is of 'warning', so the additional details may be welcome)
This adds the checks for UA classification and UA classification type exposed by SP (requirements NET0260,Table1,3 and NET0260,Table1,4).